home *** CD-ROM | disk | FTP | other *** search
- #include "ray.h"
- #include "rayrt.h"
-
- pobject the_player; // object which holds the numero uno player
-
- short Number_Of_Textures;
- wall_entry * wall; // The wall textures
- USHORT Number_Of_FTs;
- wall_entry *floortex; // The floor textures
-
- short WINDOW_HEIGHT; // The screen size constants
- short WINDOW_MIDDLE;
- short WINDOW_WIDTH; // the width of the window
- short WINDOW_MIDDLEW; // the center of the window on the x axis
- angle_type HORIZ_VIEW_RANGE;
- long SCALE_FACTOR; //used for sprites
- short VERTICAL_VIEW_RANGE;
- unsigned long VERTICAL_SCALE;
- angle_type VERTICAL_VIEW_ANGLE;
-
- Ptr buff, back;
- Byte *sliver_texture; // pointer to texture being rendered
- int sliver_column; // index into texture i.e. which column of texture
- int sliver_top; // starting Y position to render at
- int sliver_scale; // overall height of sliver
- int sliver_ray; // current ray being cast
- int sliver_clip; // index into texture after clipping
- Byte * sliver_light; // Index to palette with correct level of
- //light to draw
-
- Byte *scale_row; // row of scale value look up table to use
- MYFIXED sliver_inc_y; // incrementer to y pos in bitmap
- long sliver_and_x, sliver_and_y; // values to make sure we don't run off texture
-
- wall_run_info * wall_runs ; // array of wall runs used in rendering
- long wall_run_count; // how many runs to draw?
-
- floor_run_info * floor_runs; // array of floor runs used in rendering
- long floor_run_count; // how many runs to draw?
-
- long * distance_table; // table to hold distances to floors and ceilings for
- // each ray
- //long * movement_table; // table for stepping across the texture at a given scan line
-
- long *tan_table; // tangent tables used to compute initial
- long *inv_tan_table; // intersections with ray
-
- long *cos_table; // used to cancel out fishbowl effect
-
- long *inv_cos_table; // used to compute distances by calculating
- long *inv_sin_table; // the hypontenuse
-
- long *rcos_table;
- long *rsin_table;
-
- Byte * * pal_table; // The light palette array
-
- MYFIXED *height_table; // scales wall height relative to distance
-
- MYFIXED *middle_table; // used to correct for looking up + down
-
- MYFIXED y_inv_trans; // variable to help calculate speed at which to move across wall texture
-
- MYFIXED y_trans; // variable to translate distance to a screen height scaler
- MYFIXED x_inv_trans; // same but for floors
- MYFIXED vert_angle_tangent; // variable to calculate view height is a given distance away
- // Globals to hold the world!
-
- USHORT Number_Of_Vectors;
- USHORT Number_Of_Sidedefs;
- USHORT Number_Of_Linedefs;
- USHORT Number_Of_Sectors;
- USHORT Number_Of_Segs;
- USHORT Number_Of_SSectors;
- USHORT Number_Of_Nodes;
-
- vector2 * Vector_List;
-
- sidedef * Sd_List;
-
- linedef * Ld_List;
-
- sector * Sector_List;
-
- seg * Seg_List;
-
- ssector * SS_List; // no, this is not a reference to a Nazi secret police census report.
-
- bsp_node * bsp_tree; // The mother of all data structures- the binary space partition
- // By day, a simple runtime allocated array- but by night, a static
- // binary tree we will use to render at warp speed
-
- long bsp_start_node; // holds the first node in the bsp tree, usually 0
-
- wall_entry * sky_texture;
-
- // Rendering Data
-
- MYFIXED
- Win_Top_Sum, Win_Height_Sum,
- Win_Top_Increment, Win_Height_Increment;
-
- short WINDOW_LEFT, WINDOW_RIGHT;
-
- long cur_angle_diff, intercept;
-
- long render_x, render_y, render_z, render_view_angle;
-
- MYFIXED vec_int_x, vec_int_y;
-
- long rotate_x, rotate_y, rotate_angle;
-
- long int_x_diff;
-
- long ray_slope;
-
- long int_y_diff;
-
- tex_mark * tex_mark_table;
-
- clip_info_list * column_data;
-
- clip_info_node * clip_info_array;
-
- clip_info_list next_free_node_cl;
-
- vb_node_index vb_next_free_node, vb_start_node;
-
- vb_node * bounds;
-